package com.xc.h05.service.changlongfei.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.h05.entity.CoursetalkCLFV;
import com.xc.h05.mapper.CoursetalkMapper;
import com.xc.h05.service.changlongfei.VCoursetalkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class VCoursetalkServiceImpl implements VCoursetalkService {
    @Autowired
    private CoursetalkMapper coursetalkMapper;

    @Override
    public PageInfo<CoursetalkCLFV> getCoursetalkByPage(int pageNum, int pageSize, CoursetalkCLFV coursetalkCLFV) {
        PageHelper.startPage(pageNum, pageSize);
        List<CoursetalkCLFV> coursetalkCLFVS = coursetalkMapper.selectCoursetalkByPage(coursetalkCLFV);
        return new PageInfo<>(coursetalkCLFVS);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return coursetalkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteCoursetalkBatch(Long[] ids) {
        return coursetalkMapper.deleteCoursetalkBatch(ids);
    }

}
